import {
  REST,
  RESTPostAPIChatInputApplicationCommandsJSONBody,
  Routes,
} from 'discord.js';

export const registerCommandsInGuild = (
  rest: REST,
  guildId: string,
  clientId: string,
  commands: RESTPostAPIChatInputApplicationCommandsJSONBody[],
) =>
  rest.put(Routes.applicationGuildCommands(clientId, guildId), {
    body: commands,
  });
export const registerCommandsGlobally = (
  rest: REST,
  clientId: string,
  commands: RESTPostAPIChatInputApplicationCommandsJSONBody[],
) =>
  rest.put(Routes.applicationCommands(clientId), {
    body: commands,
  });
export default registerCommandsInGuild;
